Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove -k when using sshpass, this is not need by Jenkins and freezin… #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GeVa2072
Copy link

Remove -k when using sshpass, this is not need by Jenkins and freezing ansible-playbook

@jcsirot
Copy link
Member

jcsirot commented Dec 27, 2016

Can you give me more details on your setup. I cannot reproduce your issue. The -k flag is required when using a username/password instead of a private key for the SSH connection.

@bjakubiak
Copy link

bjakubiak commented Feb 9, 2017

The issue can be reproduced when one uses password meant to be used by sudo.
Without jenkins it would look like:
ansible -i inventory -m command -a hostname --become -K some-host
It works when using ssh key to connect with ssh, and password to authorize sudo.

But plugin always adds -k when using password credentials, so you can't combine these two: key for ssh connection and password credentials for sudo authorization. Under the hood ansible asks for two passwords and gets only one, that's why it hangs.

This PR doesn't seem to address the issue too well though. It always removes -k so people would then need to add -k manually when not using sudo. Which breaks existing jobs.

@svscorp
Copy link

svscorp commented Oct 26, 2017

I'd say "-k" option is needed, make it configurable. It's quite a rare case that you have immediately a setup with all certificates and keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants